Marking message as "seen" should not mark buffer as changed.
authorRichard Stallman <rms@gnu.org>
Thu, 23 Jun 2011 16:38:40 +0000 (12:38 -0400)
committerRichard Stallman <rms@gnu.org>
Thu, 23 Jun 2011 16:38:40 +0000 (12:38 -0400)
lisp/ChangeLog
lisp/mail/rmail.el

index 343a6749575aa439da98bbda47468782e8620cfe..0fc6c7e0fc85c5b0512a1be2434457efb00a5c6d 100644 (file)
@@ -1,6 +1,7 @@
 2011-06-23  Richard Stallman  <rms@gnu.org>
 
        * mail/rmail.el (rmail-retry-ignored-headers): Add message-id.
+       (rmail-show-message-1): Preserve buffer modified flag.
 
 2011-06-23  Michael Albinus  <michael.albinus@gmx.de>
 
index a65c8376642b897e1dded0414662539ad8547da4..33f87d634a3326c333fe8d83bffc5ae778c9f35b 100644 (file)
@@ -2669,8 +2669,11 @@ The current mail message becomes the message displayed."
            (t (setq rmail-current-message msg)))
       (with-current-buffer rmail-buffer
        (setq header-style rmail-header-style)
-       ;; Mark the message as seen
-       (rmail-set-attribute rmail-unseen-attr-index nil)
+       ;; Mark the message as seen, but preserve buffer modified flag.
+       (let ((modiff (buffer-modified-p)))
+         (rmail-set-attribute rmail-unseen-attr-index nil)
+         (unless modiff
+           (set-buffer-modified-p nil)))
        ;; bracket the message in the mail
        ;; buffer and determine the coding system the transfer encoding.
        (rmail-swap-buffers-maybe)